package com.amado.course19ErrorSummary.exception;
/**
 * Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2
 * 数组下标越界：当访问的下标超过数据长度时
 * 解决：根据数组长度来做循环或判断
 * @author Administrator
 *
 */
public class ArrayIndexOutOfExceptionTest {
	public static void main(String[] args) {
		String[] array = new String[2];
		for(int i=0;i<3;i++){
			System.out.println(array[i]);
		}
		
	}
}